Practice Set 2

We'll cover the following

Practice Set 2#

The database relationship model is reprinted below for reference.

widget

Connect to the terminal below by clicking in the widget. Once connected, the command line prompt will show up. Enter or copy and paste the command ./DataJek/Lessons/quiz.sh and wait for the MySQL prompt to start-up.

Terminal 1
Terminal

Click to Connect...

Write and execute queries for the following questions:

  1. Write a query to display all those actors who have acted in 2 or more movies.

Expected Result:

Actor_Names
actor 1
actor 2
actor n
  1. Find the cast of movie Mr and Mrs. Smith without using joins.

Expected Result:

Cast Of Mr. & Mrs. Smith
actor 1
actor 2
actor n
  1. Print a list of movies and the actor(s) who participated in each movie ordered by movie name.

Expected Result:

Movie_Name Actor_Name
movie 1 actor 1
movie 1 actor 7
movie n actor 3
  1. Print the count of actors in each movie.

Expected Result:

Movie_Name Actor_Count
movie 1 cnt#1
movie 2 cnt#2
movie n cnt#n
  1. List the names of Producers who never produced a movie for Tom Cruise.

Expected Result:

Producer_Never_Worked_With_Tom
producer 1
producer 2
producer n
Solution Practice Set 1
Solution Practice Set 2
Mark as Completed
Report an Issue